﻿#region Imports
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Xml.Serialization;
#endregion Imports

namespace PlaylistAnalyzer.Models
{
    /// <summary>
    /// Synchronized Multimedia Integration Language
    /// </summary>
    /// <seealso cref="http://en.wikipedia.org/wiki/Synchronized_Multimedia_Integration_Language" />
    [XmlRoot("smil")]
    [Description("Synchronized Multimedia Integration Language")]
    public class SynchMultimedIntegLang
    {
        #region Properties
        [XmlElement("head")]
        public Head Head { get; set; }
        [XmlElement("body")]
        public Body Body { get; set; }
        #endregion Properties
    }

    /// <summary>
    /// Head
    /// </summary>
    [XmlType("head")]
    public class Head
    {
        #region Properties
        [XmlElement("meta")]
        public Meta Meta { get; set; }
        [XmlElement("author")]
        public string Author { get; set; }
        [XmlElement("title")]
        public string Title { get; set; }
        #endregion Properties
    }

    /// <summary>
    /// Meta
    /// </summary>
    [XmlType("meta")]
    public class Meta
    {
        #region Properties
        [XmlElement("name")]
        public string Name { get; set; }
        [XmlElement("content")]
        public string Content { get; set; }
        #endregion Properties
    }

    /// <summary>
    /// Body
    /// </summary>
    [XmlType("body")]
    public class Body
    {
        #region Properties
        [XmlElement("seq")]
        public Seq Seq { get; set; }
        #endregion Properties
    }

    /// <summary>
    /// Seq
    /// </summary>
    [XmlType("seq")]
    public class Seq
    {
        #region Properties
        [XmlElement("media")]
        public ObservableCollection<Media> AllMedia { get; set; }
        #endregion Properties
    }

    /// <summary>
    /// Media
    /// </summary>
    [XmlType("media")]
    public class Media
    {
        #region Properties
        [XmlElement("src")]
        public string FilePath { get; set; }
        [XmlElement("cid")]
        public string CId { get; set; }
        [XmlElement("tid")]
        public string TId { get; set; }
        #endregion Properties
    }
}
